﻿using System.Collections.Generic;
using Microsoft.Phone.Controls;
using System.Xml;
using System.Xml.Linq;
using System.Linq;
using ProtetoresDaMata.Objects;
using ProtetoresDaMata.Smarts;

namespace ProtetoresDaMata
{
    public partial class RewardsPage : PhoneApplicationPage
    {
        public RewardsPage()
        {
            InitializeComponent();
            LoadList();
        }

        private void LoadList()
        {
            Helpers helpers = new Helpers();

            List<RewardTO> rewards = new List<RewardTO>();

            rewards = helpers.GetRewards();

            if (rewards.Count > 0)
            {
                RankingList.Items.Clear();
                RankingList.ItemsSource = rewards;
            }
        }
    }
}